// 按需引入echarts
import * as echarts from 'echarts/core';
import Vue from 'vue';
import {
    GridComponent,
    TooltipComponent,
    TitleComponent,
    LegendComponent,
} from 'echarts/components';
import {
    LineChart,
    PieChart,
    BarChart,
    GaugeChart,
    PictorialBarChart,
} from 'echarts/charts';
import {
    CanvasRenderer,
} from 'echarts/renderers';

echarts.use([
    GridComponent,
    TitleComponent,
    TooltipComponent,
    LineChart,
    PieChart,
    CanvasRenderer,
    LegendComponent,
    BarChart,
    GaugeChart,
    PictorialBarChart,
]);

Vue.prototype.$echarts = echarts;
